// 导入表单组件
import Input from './Input.vue';
import InputNumber from './InputNumber.vue';
import Textarea from './Textarea.vue';
import Select from './Select.vue';
import Checkbox from './Checkbox.vue';
import Radio from './Radio.vue';
import Form from './Form.vue';
import FormItem from './FormItem.vue';
import Option from './Option.vue';
import { install } from '../helpers';

// 组件列表
export const TuiFormComponents = {
  'tui-input': Input,
  'tui-input-number': InputNumber,
  'tui-textarea': Textarea,
  'tui-select': Select,
  'tui-checkbox': Checkbox,
  'tui-radio': Radio,
  'tui-form': Form,
  'tui-form-item': FormItem,
  'tui-option': Option
};

// 安装函数
const formInstall = (app: any) => {
  install(app, TuiFormComponents)
};

// 导出组件和安装函数
export { Input, InputNumber, Textarea, Select, Checkbox, Radio, Form, FormItem, Option, formInstall };

// 导出类型
export type { TuiInputProps, TuiInputNumberProps, TuiFormItemProps } from './types';